package BC97_有序序列插入一个整数;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++){
            list.add(sc.nextInt());
        }
        list.add(sc.nextInt());
        list.sort(Integer::compareTo);
        for (Integer e : list){
            System.out.printf(e + " ");
        }


    }
}
